/**
 * @Project TMHSC
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate Feb 25, 2011
 * @Createtime 5:52:15 PM
 */

package com.tmh.study.aS3DP.mcv.minimalist
{
	import flash.display.Stage;
	import flash.events.KeyboardEvent;

	public class RootNodeView extends CompositeView
	{
		public function RootNodeView(model:IModel, controller:IKeyboardInputHandler, target:Stage)
		{
			super(model, controller);

			target.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
		}

		private function onKeyPress(event:KeyboardEvent):void
		{
			(_controller as IKeyboardInputHandler).keyPressHandler(event);
		}
	}
}